﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;

namespace Project.PH4.SX1.ApplicationServiceResult.Paged
{
    public class ListResult<T> : IListResult<T>
    {
        IEnumerable<T> item;

        public IEnumerable<T> Item
        {
            get => item ?? (item = new List<T>());
            set => item = value;
        }

        public ListResult()
        {
        }

        public ListResult(IEnumerable<T> item,int pageIndex,int pageSize)
        {
            Item = item.Skip((pageIndex-1) * pageSize).Take(pageSize);
        }
    }
}
